<!--组件-快讯Cell-->
<template>
  <div class="cell">

    <div class="row mb30">


      <div class="row acenter" @click="userClick">
        <LImage class="img-head" :src="item.avatar"></LImage>

        <div class="column mr10">
          <text class="font32 fontz text2 mb2">{{item.nickName}}</text>
          <text class="font24 fontz text3">{{item.time}}</text>
        </div>
      </div>

      <div class="all"></div>
      <!-- <div class="but-dingyue" :class="[item.isSubscriber==1 ? 'no-b1' : 'main-b1']" @click="dingyueClick">
        <LImage v-if="item.isSubscriber==0" class="img-dingyue" :src="Config.img('dingyue.png')"></LImage>
        <text class="font26 fontz" :class="[item.isSubscriber==1 ? 'text3' : 'main-t1']">{{item.isSubscriber==1 ? T('已订阅') : T('订阅')}}</text>
      </div> -->
      <div class="but-genduo" @click="funcClick($event)">
        <LImage class="img-genduo" :src="Config.img('gongneng.png')"></LImage>
      </div>
    </div>

    <text class="font26 text2 lebel mb30" @click="infoClick">{{item.content}}</text>
  
    <div class="row jend">
      <div class="buts mr40" @click="zhanClick">
        <LImage v-if="item.isLike==1" class="img-zan" :src="Config.img('zan_.png')"></LImage>
        <LImage v-else class="img-zan" :src="Config.img('zan.png')"></LImage>
        <text class="font30" :class="[item.isLike==1 ? 'udRed-t1' : 'text3']">{{T('点赞')+'('+item.likeNum+')'}}</text>
      </div>
      
      <div class="buts" @click="shareClick">
        <LImage class="img-zan" :src="Config.img('fenxiang.png')"></LImage>
        <text class="font30 text3">{{T('分享')}}</text>
      </div>
    </div>
    <div class="line line1"></div>
  </div>
</template>
    

<script>
//功能
import jconfig from "@/_js/config";

import I18N from "@/_i18n/i18n";
var T = I18N.t;
export default {

  props: {
    item: Object, 
  },

  data() {
    return {
      T:T,
      Config:jconfig,
    };
  },

  created() {
  },

  methods: {

    /********************************** 点击触发*/
    //用户信息
    userClick() {
      this.$emit('user', this.item);
    },

    infoClick() {
      this.$emit('info', this.item)
    },
    
    //订阅
    dingyueClick(){
      this.$emit('dingyue', this.item);
    },

    //功能
    funcClick(event){
      this.$emit('func', this.item, event);
    },

    //点赞
    zhanClick() {
      this.$emit('zhan', this.item);
    },

    //分享
    shareClick() {
      this.$emit('share', this.item);
    }
  },
};
</script>

<style src="@/_css/style.css" ></style>
<style scoped>
.cell {
  padding: 40px;
}
.img-head {
  width: 70px;
  height: 70px;
  border-radius: 35px;
  margin-right: 20px;
}
.but-dingyue {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 25px;
  border-width: 2px;
  padding: 0 20px;
  margin-right: 10px;
}
.but-genduo {
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 20px;
  margin-top: -10px;
}
.img-dingyue {
  width: 25px;
  height: 25px;
}
.img-genduo {
  width: 36px;
  height: 8px;
}

.img-gengduo {
  width: 40px;
  height: 20px;
}
.lebel {
  line-height: 40px;

  lines:4; 
  text-overflow: ellipsis;
}

.buts {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.img-zan {
  width: 36px;
  height: 36px;
  margin-right: 14px;
}
.img-fen {
  width: 36px;
  height: 36px;
}
.line {
  position: absolute;
  bottom: 0;
  left: 0;

  width: 750px;
  height: 1px;
}
</style>